/**
 * 
 */
package com.seraph.zys.report.model;

/**
 * 类说明:<br>
 * 创建时间: 2011-8-23 下午3:49:49<br>
 * 
 * @author Seraph.Liu<br>
 * @email: seraph115@gmail.com<br>
 */
public class Point {

	private int x;

	private int y;
	
	// private volatile int hashCode;

	public Point() {
		super();
	}

	public Point(int x, int y) {
		super();
		this.x = x;
		this.y = y;
	}
	
	public int getX() {
		return x;
	}

	public void setX(int x) {
		this.x = x;
	}

	public int getY() {
		return y;
	}

	public void setY(int y) {
		this.y = y;
	}
	
	public void setXY(int x, int y) {
		this.x = x;
		this.y = y;
	}
	
	@Override
	public String toString() {
		return "Point [x=" + x + ", y=" + y + "]";
	}

	@Override
	public int hashCode() {
		int result = 17;
		result = 31 * result + x;
		result = 31 * result + y;
		return result;
	}

	@Override
	public boolean equals(Object o) {
		if (o == this) {
			return true;
		}
		if (!(o instanceof Point)) {
			return false;
		}
		Point pt = (Point) o;
		return pt.x == this.x && pt.y == this.y;
	}

}
